package com.marketlive.app.b2c.session;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/*
(C) Copyright MarketLive. 2006. All rights reserved.
MarketLive is a trademark of MarketLive, Inc.
Warning: This computer program is protected by copyright law and international treaties.
Unauthorized reproduction or distribution of this program, or any portion of it, may result
in severe civil and criminal penalties, and will be prosecuted to the maximum extent
possible under the law.
*/


import java.util.Stack;

/**
 * A general purpose bean that holds two stacks one for destination paths and the other for origin paths.
 * This bean is intended for the request processor for the processRoles method.
 * @see com.marketlive.app.b2c.struts.PojoSpringTilesRequestsProcessor#processRoles(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.apache.struts.action.ActionMapping)
 */
public class StackBean {
    private static Log log = LogFactory.getLog(StackBean.class);


    public StackBean() {
        log.debug("StackBean created " + this);
    }
    /**
     *  A stack to hold destination paths (where you are going to)
     */
    private Stack destination = null;
    /**
     *  A stack to hold origin paths (where you come from)
     */
    private Stack origin = null;

    /**
     * Accessor for the destination stack.
     * @return a Stack that contains destination paths.
     */
    public Stack getDestination() {
        return destination;
    }

    /**
     * Mutator for the destination stack.
     * @param destination the stack object that will contain destination paths.
     */
    public void setDestination(Stack destination) {
        this.destination = destination;
    }

    /**
     * Accessor for the origin stack.
     * @return a Stack that contains origin paths.
     */
    public Stack getOrigin() {
        return origin;
    }

    /**
     * Mutator for the origin stack.
     * @param origin the stack object that will contain origin paths.
     */
    public void setOrigin(Stack origin) {
        this.origin = origin;
    }
}
